import Vue from 'vue'
import App from './App'
import uView from 'uview-ui';
import store from './store'//这个用上的不注释
import "./styles/common.scss"
import "./styles/helang-table.scss"

Vue.prototype.$store = store
//表单校验
import validate from '@/utlis/validate.js'
Vue.prototype.$validate=validate

Vue.use(uView);
Vue.config.productionTip = false
Vue.prototype.msgSuccess = function (msg) {
  this.$refs.uToast.show({ title: msg, type: 'success',position:'top' })
}

Vue.prototype.msgError = function (msg) {
  this.$refs.uToast.show({ title: msg, type: 'error',position:'top' })
}

Vue.prototype.msgWarn = function (msg) {
  this.$refs.uToast.show({ title: msg, type: 'warning',position:'top' })
}

// 获取权限列表
Vue.prototype.permissionList = function (msg) {
  return this.$store.state.jurisdiction.privilegesInfo
}


App.mpType = 'app'
import { myRequest } from './utlis/https.js'

//自定义请求，this.$req()
Vue.prototype.$req = myRequest
const app = new Vue({
    ...App,
	store
})

import httpInterceptor from '@/common/http.interceptor.js'
Vue.use(httpInterceptor, app)
import httpApi from '@/api/index.js'
Vue.use(httpApi, app)
import tools from '@/utlis/tools.js'
Vue.use(tools, app)
app.$mount()
